Skip to content

Conversation

mariehd
Copy link
Member

@mariehd mariehd commented Sep 4, 2026

Endringer

  • Opprettet FavoriteButton-komponent
  • La til isFavorite som prop for å styre visuell av/på-tilstand
  • Viser tomt hjerte når sangen ikke er favoritt
  • Viser fylt hjerte når sangen er favoritt
  • La til aria-label som endres basert på favorittstatus
  • Koblet FavoriteButton til App.tsx
  • Favorittfunksjonalitet og lagring er ikke implementert ennå

Test

  • npm run lint fungerer uten feil
  • npm run build fungerer uten feil
  • legg midlertidig til disse linjene i app.tsx:

øverst:
import { FavoriteButton } from './components/FavoriteButton'

i main:
import { FavoriteButton } from './components/FavoriteButton'

  • Kjør appen med nmp run devog test både isFavorite={true} og isFavorite={false}
  • Knappen viser riktig hjerte og aria-label for begge tilstander, men uten funksjonalitet

Closes #17

@mariehd mariehd requested a review from a team as a code owner September 4, 2026 09:38
@mariehd mariehd linked an issue Sep 4, 2026 that may be closed by this pull request
2 tasks
Copy link
Member

@ellahw ellahw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bra!!

@mariehd mariehd merged commit 2c4fd9e into main Sep 4, 2026
@mariehd mariehd deleted the 17-lag-favoritebutton-komponent-statisk branch September 4, 2026 16:38
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lag FavoriteButton-komponent, statisk
2 participants